
package uebString;

import java.awt.Container;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.WindowConstants;
import uebString.Testframe.QuitActionListener;



/**
 *
 * @author adier
 */
public class Testframe {

    private static class QuitActionListener implements ActionListener{

        @Override
        public void actionPerformed(ActionEvent e) {
            throw new UnsupportedOperationException("Not supported yet.");
        }
        
    }
    
    private JFrame frame;
    
    public Testframe(){
        JFrame frame = new JFrame("ueb13");
        Container cp = frame.getContentPane();
        frame.setPreferredSize(new Dimension(250, 250));
        frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        frame.pack();
        frame.setVisible(true); 
        JMenuBar menuBar = new JMenuBar();
        JMenu fileMenu = new JMenu("Datei");
        menuBar.add(fileMenu);
        JMenuItem openItem = new JMenuItem("Open");
        fileMenu.add(openItem);
        JMenuItem quitItem = new JMenuItem("Quit");
        fileMenu.add(quitItem);
        
        
        frame.setJMenuBar(menuBar);
        
        quitItem.addActionListener(frame.new QuitActionListener());
        
    }
    
    
    
    

   
    
    
    public static void main(String[] args){
        Testframe app = new Testframe();

    }
    
    
    
    
    
}
